<?php
if (!$RENDER_MOBILE) {
	$query = "Select * from banners";
	$result = mysql_query($query);
	$num = mysql_num_rows($result);
	$SITE_MIDDLE .= "<table width='100%'><tr>";
	if ($num){
		$view = rand(0,$num-1);
		$SITE_MIDDLE .= "<td width='50%' valign='top'><center>".FormatSmallElement (GetLangString ($lang,"txt_ad"),mysql_result($result,$view,"code") ) .
		GetLangString($lang,"txt_youraddhere")."</center></td>"; 
	}
	$SITE_MIDDLE .= "<td valign='top'>";
	$SITE_MIDDLE .= FormatElement ( GetLangString ( $lang, "txt_chatroom") ,  GetLangString ( $lang, "msg_chatroom") );
	$SITE_MIDDLE .=  "<center><font size=6><a href=\"javascript:ShowChatWindow()\">".GetLangString($lang,"txt_chatnow") ."</a></font></center>";
	$SITE_MIDDLE .= "</td></tr></table>";
}	
?>
